package com.tencreat.service.mall;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tencreat.common.core.HttpResult;
import com.tencreat.common.core.domain.model.LoginUser;
import com.tencreat.common.core.domain.model.ReqIdParam;
import com.tencreat.common.core.domain.model.ReqIdsParam;
import com.tencreat.domain.mall.MallIntegralGoods;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tencreat.domain.mall.dto.GoodsIntegralListAppDTO;
import com.tencreat.domain.mall.dto.MallIntegralGoodsDTO;
import com.tencreat.domain.mall.dto.MallGoodsSearchDTO;
import com.tencreat.domain.mall.vo.IntegralChangeVO;
import com.tencreat.domain.mall.vo.ResIntegralGoodsDetailsAppVO;
import com.tencreat.domain.mall.vo.ResIntegralGoodsListAppVO;
import com.tencreat.domain.mall.vo.MallIntegralGoodsListVO;

/**
 * 积分商品Service接口
 *
 * @author tencreat
 * @date 2021-09-01
 */
public interface IMallIntegralGoodsService extends IService<MallIntegralGoods> {
    /**
     * 查询积分商品
     *
     * @param id 积分商品ID
     * @return 积分商品
     */
    MallIntegralGoodsDTO selectMallIntegralGoodsById(ReqIdParam id);

    /**
     * 查询积分商品列表
     *
     * @param mallIntegralGoods 积分商品
     * @return 积分商品集合
     */
    public List<MallIntegralGoods> selectMallIntegralGoodsList(MallIntegralGoods mallIntegralGoods);

    /**
     * 新增积分商品
     *
     * @param mallIntegralGoods 积分商品
     * @return 结果
     */
    public int insertMallIntegralGoods(MallIntegralGoodsDTO mallIntegralGoodsPo);

    /**
     * 修改积分商品
     *
     * @param mallIntegralGoods 积分商品
     * @return 结果
     */
    public int updateMallIntegralGoods(MallIntegralGoods mallIntegralGoods);

    /**
     * 批量删除积分商品
     *
     * @param ids 需要删除的积分商品ID
     * @return 结果
     */
    public int deleteMallIntegralGoodsByIds(ReqIdsParam ids);

    /**
     * 删除积分商品信息
     *
     * @param id 积分商品ID
     * @return 结果
     */
    public int deleteMallIntegralGoodsById(ReqIdParam id);

    int updateGoodsPo(MallIntegralGoodsDTO mallIntegralGoodsPo);

    IPage<MallIntegralGoodsListVO> apiList(MallGoodsSearchDTO mallGoodsSearchPo);

    Page<ResIntegralGoodsListAppVO> pageList(Page<ResIntegralGoodsListAppVO> page, GoodsIntegralListAppDTO dto);

    HttpResult<ResIntegralGoodsDetailsAppVO> details(Long id, LoginUser loginCheck);

    IPage<Map<String, Object>> pcList(Page<Map<String, Object>> page, String goodsName, Long count, Date beginTime, Date endTime,Integer zoneId,String sortStr,String sortDesc,Integer goodsId,String supplierName);

    int insert(List<MallIntegralGoods> mallIntegralGoods);

    boolean reSortOrderReduce(MallIntegralGoods reqIdParam);

    boolean reSortOrderPlus(MallIntegralGoods reqIdParam);

    int updateNum(Long id,Integer num);

    IntegralChangeVO statistics();
}
